﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Common.DTO;
using LogicLayer;

namespace ImmoralServices
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "PlayerService" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select PlayerService.svc or PlayerService.svc.cs at the Solution Explorer and start debugging.
    public class PlayerService : IPlayerService
    {
        public Boolean CheckPlayer(string namn)
        {
            return PlayerHandler.CheckPlayer(namn);
        }

        public bool SetNamePlayer(string namn)
        {
            return PlayerHandler.SetAndControlPlayerName(namn);
        }

        public Player LoginPlayer(string login, string password)
        {
            return PlayerHandler.LoginPlayer(login, password);
        }

        public List<Player> GetAllPlayer()
        {
            return PlayerHandler.GetPlayerList();
        }

        public Player GetOpponent(int sessionId, int playerId)
        {
            return PlayerHandler.GetOpponent(sessionId, playerId);
        }
    }
}
